/*
 * @Author: wy
 * @Date: 2020-12-16 16:02:09
 * @LastEditTime: 2021-03-16 15:56:04
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \radio-web\src\components\common\renderDom.js
 */
export default{
  // 定义函数组件，渲染自定义标签内容
  functional: true,
  props: {
    column: {
      type: Object,
      default: {}
    },
    row: {
      type: Object,
      default: {}
    },
    // 父组件实例，用于某些列绑定事件时，调用父组件方法
    pvm: {
      type: Object,
      default: {}
    }
  },
  /**
   *渲染函数
   * @param {* createElement,创建虚拟dom} h
   * @param {* 上下文对象} context
   */
  render: (h, context) => {
    // console.log(h, context)
    const { column: { render }, row, pvm } = context.props
    return h('span', {}, [render(h, row, pvm)])
  }
}
